import Vue from 'vue'
import Vuex from 'vuex'

Vue.use(Vuex)

export default new Vuex.Store({
  state: {
    header: true,
    header_active: 0,
    header_active1: 0,
    checkData: {
      show: false,
      type: '',
      data: {}
    },
    searchData: []
  },
  mutations: {
    SAVE_SEARCHDATA(state, data) {
      state.searchData = data
    },
    SETTING_HEADER(state, option) {
      state.header = option
    },
    SETTING_HEADER_ACTIVE(state, option) {
      state.header_active = option
    },
    SETTING_HEADER_ACTIVE1(state, option) {
      state.header_active1 = option
    },
    SETTING_MASK(state, option) {
      state.checkData = {
        show: true,
        type: option.type,
        data: option.data
      }
    },
    CLOSE_MASK(state) {
      state.checkData = {
        show: false,
        type: '',
        data: {}
      }
    }
  },
  actions: {
  },
  modules: {
  }
})
